<template>
  <div id="addGoods">
    <div class="top">
      <div>商品分类</div>
      <el-button size="mini" class="el-icon-arrow-left" @click="goBack()">返回</el-button>
    </div>
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>添加分类</span>
      </div>
      <el-row :gutter="20">
        <el-col :span="12" :offset="8">
          <el-form>
            <div class="form">
              <div>
                <span>分类名称：</span>
                <el-input v-model="input" placeholder="请输入内容"></el-input>
              </div>
              <div>
                <span>上级分类：</span>
                <el-select v-model="value" placeholder="请选择分类">
                  <el-option> </el-option>
                </el-select>
              </div>
              <div>
                不选择分类默认为顶级分类
              </div>
              <div>
                <span>排序：</span>
                <el-input v-model="input" placeholder="请输入内容"></el-input>
              </div>
              <div>
                <span>是否显示：</span>
                <el-radio v-model="radio" label="1">是</el-radio>
                <el-radio v-model="radio" label="2">否</el-radio>
              </div>
              <div>
                <span>是否显示在导航栏：</span>
                <el-radio v-model="radio" label="1">是</el-radio>
                <el-radio v-model="radio" label="2">否</el-radio>
              </div>
              <div>
                <span>选择模板：</span>
                <el-select v-model="value" placeholder="服装">
                  <el-option> </el-option>
                </el-select>
              </div>
              <div>
                <span></span>
                <el-button type="primary">提交</el-button>
              </div>
            </div>
          </el-form>
        </el-col>
      </el-row>
    </el-card>
  </div>
</template>
<script>
export default {
  created() {
    this.getGoodsInfo()
  },
  methods: {
    async getGoodsInfo() {
      const res = await this.$http.post('http://localhost:9002/category/search/3/10')
      console.log(res)
    },
    goBack() {
      this.$router.go(-1)
    }
  }
}
</script>
<style scoped lang="less">
#addGoods {
  height: 100%;
  .top {
    display: flex;
    height: 50px;
    border-bottom: 2px solid #ccc;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
    div {
      margin-left: 30px;
    }
    .el-button {
      margin-right: 30px;
    }
  }
}
.el-card {
  text-align: center;
  margin: 0 30px 60px;
  .clearfix {
    font-size: 12px;
    text-align: left;
  }
}
.el-card__header {
  height: 500px;
  padding: 0px;
}
.el-input {
  width: 220px;
}
.el-card[data-v-6629f57f] {
  text-align: left;
}
.form {
  font-size: 12px;
  color: #666;
  div {
    margin-bottom: 10px;
    span {
      display: inline-block;
      width: 110px;
      text-align: right;
    }
  }
  div:nth-child(3) {
    color: #999;
    margin-left: 120px;
  }
}
</style>
